package com.redlight.pool;

/**
 * Created by chao on 2019/1/23.
 */
public interface IPoolTask<T> {
    /**
     * 初始化
     * @param id
     * @param pool
     * @param param
     */
    public void  init(String id,ThreadPool pool,T param);

    /**
     * 获取线程id
     * @return
     */
    public String getThreadId();


    /**
     * 获取开始时间
     * @return
     */
    public long getStartTim();

    /**
     * 关闭线程
     * @throws Exception
     */
    public void stop()throws Exception;

    /**
     * 获取当前线程
     * @return
     */
    public Thread getThread();

    /**
     * 获取线程运行标识
     * @return
     */
    public boolean getRunnFlg();


}
